JBoss Community Archive (Read Only)

GateIn Portal 3.5

Deactivation of the Ajax Loading Mask Layer

The loading mask layer is deployed after an ajax-call. It aims at blocking the GUI to prevent further user actions until the the ajax-request has been completed.

However, the mask layer may need to be deactivated in instances where the portal requires user instructions before the previous instructions have been carried out.

Deactivate the ajax-loading mask

Simply enerate a script to make an asynchronous ajax-call. Use the uicomponent.doAsync() method rather than the uicomponent.event() method. For example:

<a href="<%=uicomponent.doAsync(action, beanId, params)%>" alt="">Asynchronous</a>

Synchronous issue

Most web browsers support ajax requests in two modes: Synchronous and Asynchronous. This mode is specified with a boolean bAsync parameter.

var bAsync = false; // Synchronous
request.open(instance.method, instance.url, bAsync);

However, to work with browsers that do not support the Synchronous requests, bAsync is always set to true (The Ajax request will always be asynchronous).

// Asynchronous request
request.open(instance.method, instance.url, true);
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-10 12:48:07 UTC, last content change 2012-10-09 14:59:06 UTC.